System and method for creating web services from an existing web site

ABSTRACT

Web services are generated from an existing web site having web page based business processes or transactions. A script is generated representative of a user navigation sequence involved to perform the transaction. The script elements include the web application calls, input/output parameters, and/or the interrelation between the elements of the transaction. A WSDL file, web service interface code, and web service implementation code are generated from the navigation script, and may be published locally to the web site or on a remote site.

FIELD OF THE INVENTION

This invention relates to web services technology, and more particularlyto publishing web page based transactions as web services from anexisting web application.

BACKGROUND OF THE INVENTION

Every year, more and more business is being transacted over theInternet. Business processes or transactions conducted over a networksuch as the Internet are typically implemented through web pages withsoftware components, called web applications, enabling the transactions.Some enterprises having Internet sites with transactional capabilitiesoffer business to customer (B2C) or business to business (B2B)communications.

B2C communication is described with reference to FIG. 1. Traditionally auser 16 conducts transactions on the Internet 12 with a web applicationinterface 32 of the web application 18 as shown via the dashed arrows inFIG. 1. The user 16 typically accesses the transactions 22-24 of the webapplication 18 via the Internet 12 and the web application interface 32through web pages of the web application 18. Web pages are typicallywritten in hypertext markup language (HTML) for browsers on personalcomputers, wireless markup language (WML) for browsers on mobile phones,or the like. The web application 18 presents an interface to the user 16by providing web pages, which the user 16 navigates to perform thetransactions 22,24.

B2B communication is also described with reference to FIG. 1. For B2Bcommunication, the web application on the server side must provide aprogramming interface to client applications. For this purpose, webservices have been developed.

A web service is a software component that is well understood by askilled person in the industry. The strength of web services is thestandardized way to integrate various heterogeneous applications withoutprior knowledge of the specific implementation of each application. Webservices allow different applications implemented in different sourcesto communicate by using a standardized description language such as WebService Description Language (WSDL), simple object access protocol(SOAP), and universal description, discovery, and integration (UDDI). AWSDL file is a description language file written in extensible markuplanguage (XML) that describes the functions and their associatedinput/output parameters provided by the web service, which may be calledby a user application (also called a web service client). The userapplication, before accessing the web service, reads the WSDL file andadapts its calls accordingly. The WSDL file may be stored on the sameserver as the server hosting the web service or in a different server ordirectory. Web services allow a programmatic access to distributedtransactions over the Internet to provide data or functionality toanother application.

However, creating, deploying and publishing web services to conducttransactions for web applications is complex and requires advancedprogramming skills. The amount of programming required is time intensiveand the cost involved is substantial, for example, complex componentssuch as application servers are typically required. Often, enterprisesare not able to afford the expense associated with web servicestechnology.

The current approach to build and deploy a web service 14 is shown inthe computer network system 10 of FIG. 1. Such web services aretypically programmed by the service provider or owner of the webapplication 18 and implemented on the same web server 26 hosting the webapplication 18. The web service 14 consists of two logical blocks, onefor interfacing with the user application 20, i.e., the web serviceinterface 28, and one for interfacing with the web application 18, i.e.,the web service implementation 30. Knowledge of the web server 26 andweb application language code allows the owner to program and deploy theweb service interface 28 and web service implementation 30 thatinteracts directly with the code of the web application 18 to conductthe transactions 22-24. The web service interface 28 interacts with auser application 20 via a network, such as the Internet 12, to executecalls from the user application 20 and conduct the transactions 22-24 ofthe web application 18. The web service 14 interacts directly with thetransactions via the web service implementation 30. Although advancedprogramming skills are required to implement the web service 14, this isa common technique of implementing web services that is well known inthe art. The interrelation between user application 20, web applicationtransactions 22-24, and web service 14 is shown via solid arrows in FIG.1.

The main problems with previous approaches are that advanced programmingskills are necessary and knowledge of the transaction interface of theweb application is required to implement and deploy the web service.There is a need for a system and a method for generating web servicesthat alleviates the problems associated with the previous approaches.

BRIEF SUMMARY OF THE INVENTION

It is an object of the invention to provide a system and method todevelop a web service without having the knowledge of the webapplication transaction programming interface.

In accordance with the present invention, there is provided a method forgenerating a web service providing a programming interface between a webapplication and a user application, the method comprising: creating ascript of a navigation flow of at least one transaction of the webapplication, the navigation flow representative of an interactionbetween a user and a web application interface of the web applicationduring the at least one transaction; creating a text file describing afunction and at least one of an input parameter or an output parameter,the function to be called by the user application for executing the atleast one transaction; creating web service interface code correspondingto a call of the function as described in the text file; and creatingweb service implementation code for executing the interaction.

An embodiment creates a script of the navigation by recording thenavigation flow of a human user conducting a transaction in the webapplication. The script of the navigation flow of the web serviceimplementation code may be generated by a regression test tool. Thescript of the navigation flow may be written in script language. A textfile is created taking the navigation flow script as input. The textfile may be a WSDL file.

Another aspect of the invention provides a system for generating a webservice providing a programming interface between a web application anda user application, the system comprising: means for creating a scriptof a navigation flow of at least one transaction of the web application,the navigation flow representative of an interaction between a user anda web application interface of the web application during the at leastone transaction; means for creating a text file describing a functionand at least one of an input parameter or an output parameter, thefunction to be called by the user application for executing the at leastone transaction; means for creating web service interface codecorresponding to the call of the function as described in the text file;and means for creating web service implementation code for executing theinteraction.

In an embodiment, the text file may be generated by processing thescript of the navigation flow which records of a human user conducting atransaction in the web application. The script of the navigation flow ofthe system web service implementation code may be generated by aregression test tool. The script of the navigation flow may be writtenin script language, and the text file may be a WSDL file. The webservice may be implemented in a web server hosting the web application.In another embodiment, the web application may be hosted on a webserver, and the web service may be hosted by another server.

Another aspect of the invention provides a program product stored on acomputer-readable medium, which when executed, enables a computer systemto generate a web service providing a programming interface between aweb application and a user application, the program product comprisingcomputer program code for enabling the computer system to: create ascript of a navigation flow of at least one transaction of the webapplication, the navigation flow representative of an interactionbetween a user and a web application interface of the web applicationduring the at least one transaction; create a text file describing afunction and at least one of an input parameter or an output parameter,the function to be called by the user application for executing the atleast one transaction; create web service interface code correspondingto a call of the function as described in the text file; and create webservice implementation code for executing the interaction.

With the solution of an embodiment of the invention, a web service maybe built without the knowledge of the transaction programming interface,which usually belongs to the web application owner. Consequently, a webservice may be developed according to an embodiment of the invention bythe client application owner or an Internet service provider.

Another advantage of the method of an embodiment of the invention isthat the steps may be automated with the use of existing test toolsand/or by writing a program product to create the WSDL file from anavigation flow and/or a program product to translate WSDL into a webservice interface code, and/or a program product to create the webservice implementation code from a navigation flow. All the programproducts may be written by a person skilled in the art without muchdifficulty to develop.

Finally, with the solution of an embodiment of the invention, a webapplication providing B2C communication to users may be enriched withthis method for developing a web service providing a B2B communicationto user applications.

BRIEF DESCRIPTION OF THE DRAWINGS

A system and method for generating a web page based process ortransaction as a web service from a web site incorporating the presentinvention will now be described, by way of example only, with referenceto the accompanying drawings, in which:

FIG. 1 shows a computer network system with a web service implementationaccording to the prior art;

FIG. 2 shows a computer network system implementing an embodiment of theinvention; and

FIG. 3 shows a method in accordance with an embodiment of the invention.

DETAILED DESCRIPTION OF THE INVENTION

An embodiment of the invention may be implemented in the computernetwork 40 shown in FIG. 2. A web application 18 is implemented on a webserver 26 or an external web site provider in a network such as theInternet 12. The web application 18 is implemented on the web server 26with one of any number of platforms that are well known in the industry.A web server 26 may be configured to host one or more web applications18. The web application 18 may be configured with at least onetransaction_(1-N) 22-24. Of course, it will be appreciated thattransaction(s) 22-24 may include transactions as defined in the broadestsense, such as processes, retrieval of information, performance of afunction, or the like, and is not taken to be limited to merely businesstransactions. A user application 20 may send calls for conducting thetransaction(s) 22-24 of the web application 18 via the web service 42.The web service 42 may be created on the basis of an existing webapplication 18 without requiring any change to the existing webapplication interface 32. The web service 42 may be implemented on theweb server 26 of the web application 18 or on another server separate orexternal from web server 26. A web service implementation 46 of the webservice 42 of the preferred embodiment interacts with the webapplication 18 via the same web application interface 32 which isavailable to the user 16 (FIG. 1) of the web application 18.

In FIG. 2, in the web service 42 of an embodiment of the invention, theweb service 42 interfaces and interacts with the web application 18 viathe Internet 12 and the web application interface 32 of the webapplication 18. A user application 20 calls transactions 22-24 in theweb application 18 of the web server 26 via a web service interface 44.A WSDL file 48 from the web service interface 44 of the web service 42is initially read by the user application 20 before sending calls to theweb service interface 44. The web service interface 44 receives thecalls from the user application 20, and communicates the calls via webservice implementation 46 across the network 12 to the web applicationinterface 32 of the web application 18 to run the transactions 22-24.The web service implementation 46 calls the web application interface 32and simulates the web page interactions which are made by a user runninga transaction of the web application 18.

In an embodiment of the invention, the user application 20 acts as a webservice client to perform a function such as a transaction 22-24remotely. It will be appreciated that the client or user application 20may interface or call one or more web services 42 via the Internet,however only one web service 42 is shown for illustrative purposes. Theweb service 42 or portions of the web service 42 may be generatedmanually or automatically, as discussed in further detail with referenceto FIG. 3, from the existing web application 18 in order to allowconnection from the client application. In another embodiment, the webservice 42 may be hosted (not shown) by the same web server 26, or theweb service 42 may be hosted by an external service provider.

An embodiment of the invention is shown as a method 50 in FIG. 3. Themethod is for the generation of web services from an existing webapplication having transactions. The web service comprises code having amodule representative of the web service interface, and a modulerepresentative of the web service implementation. A navigation flow isfirst defined or created 52 to represent the web page interaction thatthe user activates while running a transaction. A script may begenerated via a graphical user interface. Any other possiblerepresentation of the web page interaction forming the navigation flowmay be used. The script may be stored in a memory (not shown) in thedeveloper work station. The script may be defined in any format thatcaptures and defines in detail the series of manual steps orinteractions the client user conducts in the web pages of the web sitefor completing the transaction. A sample script generated from a usernavigation of a web site to load a single page is:

/* 1. Initial - Set Environment */ lr_rendezvous(“rendezvous_1”); /* Setrendezvous point */ void lr_whoami(int FAR *vuser, LPCSTR FAR*vuser_group, int FAR *scid); LPCSTR my_host = lr_get_host_name( );LPCSTR my_controller = lr_get_master_host_name( );lr_save_datetime(“Tomorrow is %B %d %Y”, DATE_NOW + ONE_DAY, “next”);lr_output_message(lr_eval_string(“”)); /* 2. Actions */ intlr_start_transaction(LPCSTR transaction_name); /* Begin Transaction *//* Note: LPCSTR prototype is automatically defined as char* */ /*Command line parsing */ lr_get_attrib_double lr_get_attrib_longlr_get_attrib_string(char *parml); void lr_peek_events( ); /* pause */void lr_think_time(int time); /* from 0 to 32.767 */ /* Send data pointsto t_rep.eve6 event file for each Vuser */ cpu_val=cpu_check( );lr_user_data_point(“cpu”,cpu_val); lr_user_data_point(“data_point_1”,1);/* Begin Negative testcase */ lr_continue_on_error(1); /* 1=Continuewhen error occurs */ int lr_advance_param(LPCSTR param); /* next */ /*Check whether actual results are what was expected */ /* Info about HTTPrequest */ { int HttpRetCode, HttpRetSize, HttpRetTime;web_url(“dogbert”, “URL=http://dogbert”, “TargetFrame=_TOP”, LAST);HttpRetCode = web_get_int_property(HTTP_INFO_RETURN_CODE);if(HttpRetCode == 200) lr_log_message(“The Vuser successfully accessedthe page”); else lr_log_message(“The Vuser failed to access the page ”);} HttpRetSize = web_get_int_property(HTTP_INFO_DOWNLOAD_SIZE);HttpRetTime = web_get_int_property(HTTP_INFO_DOWNLOAD_TIME); /* Verifyother objects: */ int web_find(char *FindName, , , LAST); /* text */ intweb_image_check(char *CheckName, , “alt=Alt”, “src=Src”, LAST); intweb_java_check (char *Name, , “Classname=...”, , LAST); /* 3. End */ intlr_end_transaction(LPCSTR transaction_name); /* Finish Transaction */

The above script is provided for illustrative purposes as having one webpage interaction. An actual script would likely contain severalinteractions. Each transaction of the web application may be representedby such a script.

The script may be created manually, or in another embodiment, the scriptmay be produced by a web site test tool such as IBM RATIONAL SUITETESTSTUDIO (IBM, RATIONAL SUITE, and TESTSTUDIO are trademarks incertain countries of International Business Machines Corporation)available from International Business Machines Corporation, Armonk,N.Y., or LOADRUNNER (LOADRUNNER is a trademark of Mercury InteractiveCorporation in certain countries) available from Mercury InteractiveCorporation, Sunnyvale, Calif. The web service code may then begenerated from the existing web application using the navigation flowstored as script files in the preferred embodiment.

Referring to FIGS. 2 and 3, the web service implementation code 46 andthe web service interface code 44 are generated. The web serviceinterface 44 and the web service implementation 46 may be generated inparallel as shown in FIG. 3 or in any other order. The web serviceimplementation code is generated 56 from the navigation flow. The webservice implementation code simulates the web page interactions fortransactions 22-24. The web service implementation 46 interfaces orinteracts with the web application interface 32.

In another embodiment, the web service implementation code may begenerated automatically by a web site test tool, which generatesregression tests such as IBM RATIONAL SUITE TESTSTUDIO. These toolscreate the code simulating the module for interaction between web pages.The web service implementation may be written in Java code, .net or thelike.

To generate the web service interface code to interact and interfacewith client or user application 20, a WSDL file is created 62 from thenavigation flow. The script is translated by a script translator into aprogramming language to describe web services, such as a WSDL file 48,for describing the function and the input and output parameters for eachstep of each transaction. For example, in one scenario, the function ofthe transaction may be ordering a book where input and output parametersmay include book title, author name, international standard book number(ISBN), or the like. The process of translating may be achievedmanually. A person skilled in the art may also develop a programtranslating script of the navigation flow to WSDL.

Once the navigation script is translated into a language, such as WSDL,to describe a web service function with its input and/or outputparameter(s), the web service interface code is then generated 64. Theweb service interface code is generated from the WSDL file. The code maybe any type of code that is compatible within the system environment,for example Java, net, or the like. The step of web service interfacecode generation may be also automated if a program is developed. Aperson skilled in the art may develop such a program translating WSDLinto Java code or the like.

The web service implementation mainly consists of modules within the webservice, for example, a module for calls to the functions with input andoutput parameters that are similar to the call registered in thegenerated script, and a module for code to simulate interactions withinthe web pages during the transaction.

It will be understood that the system and method for generating webservices from an existing web application described above providesadvantages, such as generation of web services from web-page basedtransactions. Another advantage is that the web service is generatedbased on the transaction conducted on web pages within a web sitewithout express knowledge of the application. With this configuration,the generation and subsequent maintenance of the web service is lesscomplex than previously achievable, and web page based transactions maybe deployed as web services from an existing web application.

While shown and described herein as a method and system for generatingweb services from an existing web application, it is understood that theinvention further provides various alternative embodiments. For example,in one embodiment, the invention provides a program product stored on acomputer-readable medium, which when executed, enables a computerinfrastructure to generate web services from an existing webapplication. To this extent, the computer-readable medium includesprogram code, which implements the process described herein. It isunderstood that the term “computer-readable medium” comprises one ormore of any type of physical embodiment of the program code. Inparticular, the computer-readable medium can comprise program codeembodied on one or more portable storage articles of manufacture (e.g.,a compact disc, a magnetic disk, a tape, etc.), on one or more datastorage portions of a computing device (e.g., a fixed disk, a read-onlymemory, a random access memory, a cache memory, etc.), as a data signaltraveling over a network (e.g., during a wired/wireless electronicdistribution of the program product), and/or the like.

As used herein, it is understood that the terms “program code” and“computer program code” are synonymous and mean any expression, in anylanguage, code or notation, of a set of instructions that cause acomputing device having an information processing capability to performa particular function either directly or after any combination of thefollowing: (a) conversion to another language, code or notation; (b)reproduction in a different material form; and/or (c) decompression. Tothis extent, program code can be embodied as one or more types ofprogram products, such as and application/software program, componentsoftware/a library of functions, an operating system, a basic I/Osystem/drive for a particular computing and/or I/O device, and the like.Further, it is understood that the term “system” represents anycombination of hardware and/or software capable of performing somefunction(s).

It will be appreciated that specific embodiments of the invention arediscussed for illustrative purposes, and various modifications may bemade without departing from the scope of the invention as defined by theappended claims.

1. A method for generating a web service providing a programminginterface between a web application and a user application, the methodcomprising: creating and storing a script of a navigation flow of atleast one transaction of the web application using at least onecomputing device, the navigation flow representative of an interactionbetween a user and a web application interface of the web applicationduring the at least one transaction; creating and storing a text filedescribing a function and at least one of an input parameter or anoutput parameter using the at least one computing device, the functionto be called by the user application for executing the at least onetransaction in the script of the navigation flow; creating and storingweb service interface code corresponding to a call of the function asdescribed in the text file using the at least one computing device; andcreating and storing web service implementation code for executing theinteraction based on the script of the navigation flow using the atleast one computing device, wherein the web service implementation codeuses the web service interface code to implement the function withoutthe user; wherein the creating web service implementation code includinggenerating the navigation flow using a regression test tool; wherein thescript of the navigation flow is written in a script language.
 2. Themethod of claim 1, the creating a script including recording thenavigation flow of a human user conducting a transaction in the webapplication.
 3. The method of claim 1, wherein the text file is a WebService Description Language (WSDL) file.
 4. A computer systemcomprising: at least one computer configured to, generate a web serviceproviding a programming interface between a web application and a userapplication by: creating a script of a navigation flow of at least onetransaction of the web application, the navigation flow representativeof an interaction between a user and a web application interface of theweb application during the at least one transaction in the script of thenavigation flow; creating a text file describing a function and at leastone of an input parameter or an output parameter, the function to becalled by the user application for executing the at least onetransaction; creating web service interface code corresponding to thecall of the function as described in the text file; and creating webservice implementation code for executing the interaction based on thescript of the navigation flow, wherein the web service implementationcode uses the web service interface code to implement the functionwithout the user; wherein creating web service implementation codeincluding generating the navigation flow using a regression test tool;wherein the script of the navigation flow is written in a scriptlanguage.
 5. The system of claim 4, the creating a script includingrecording the navigation flow of a human user conducting a transactionin the web application.
 6. The system of claim 4, wherein the text fileis a Web Service Description Language (WSDL) file.
 7. The system ofclaim 4, wherein the web service is implemented in a web server hostingthe web application.
 8. The system of claim 4, wherein the webapplication is hosted on a web server, and the web service is hosted byanother server.
 9. A program product stored on a computer-readablestorage medium, which when executed, enables a computer system togenerate a web service providing a programming interface between a webapplication and a user application, the program product comprisingcomputer program code for enabling the computer system to: create ascript of a navigation flow of at least one transaction of the webapplication, the navigation flow representative of an interactionbetween a user and a web application interface of the web applicationduring the at least one transaction in the script of the navigationflow; create a text file describing a function and at least one of aninput parameter or an output parameter, the function to be called by theuser application for executing the at least one transaction; create webservice interface code corresponding to a call of the function asdescribed in the text file; and create web service implementation codefor executing the interaction based on the script of the navigationflow, wherein the web service implementation code uses the web serviceinterface code to implement the function without the user; wherein thecomputer program code for enabling the computer system to create webservice implementation code including computer program code for enablingthe computer system to generate the navigation flow using a regressiontest tool; wherein the script of the navigation flow is written in ascript language.
 10. The program product of claim 9, the computerprogram code for enabling the computer system to create a scriptincluding computer program code for enabling the computer system torecord the navigation flow of a human user conducting a transaction inthe web application.
 11. The program product of claim 9, wherein thetext file is a Web Service Description Language (WSDL) file.